<?php
namespace app\web\controller;

use think\Db;

class Host extends Base
{
  public function index()
  {
    //国内热门
    $workInt = Db::name('work as a')->join('vocation b','a.voc_id = b.id')->where('b.type','=',1)->paginate(10);
    //国外热门
    $workOut = Db::name('work as a')->join('vocation b','a.voc_id = b.id')->where('b.type','=',2)->paginate(10);
    $this->assign(array(
        'workInt' => $workInt,
        'workOut' => $workOut,
      ));
    return view();
  }
}
?>